#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int n,a[100009],m,ans;
bool kk,vis[100009],life[100009];
int main(){
    IOS
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;++i){
        scanf("%d",&a[i]);
        if(a[i]>a[i-1]&&kk)
            m=i,kk=0;
    }
    sort(a+1,a+n+1);
    for(int i=m;i<=n;++i){
        for(int j=1;j<i;++j){
            if(a[j]<a[i]&&!vis[i]&&!life[j]){
                vis[i]=1;
                life[j]=1;
            }
        }
    }
    for(int i=1;i<=n;++i)
        if(!vis[i])
            ans++;
    cout<<ans;
    return 0;
}
